//  引入二次封装好的 axios 
 import request from '../utils/request'

 /* 
    用户登录
    @param user 用户信息 {username, password}
 */
export const login = user => request({
    url: '/api/v1/doctor/sessions',
    method: 'POST',
    data: user
})

/**
 * 获取登录用户基本信息
 */
 export const getUserInfo = () => request({
    url: '/api/v1/doctor/users',
  })

export const getCurrentUser = () => request({
   url: '/api/v1/doctor/users/current'
})